Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor event and tasks #843

Merged
merged 4 commits into from
Apr 4, 2019
Merged

Refactor event and tasks #843

merged 4 commits into from
Apr 4, 2019

Conversation

NicolasMahe
Copy link
Member

No description provided.

@NicolasMahe NicolasMahe changed the title Merge events in one data structure Refactor event and tasks Apr 3, 2019
@NicolasMahe
Copy link
Member Author

NicolasMahe commented Apr 3, 2019

I updated this PR:

  • I create a new file contract/parseEvents.ts that only normalize event from ethereum (convert timestamp to date, unit 'wei' to 'ether', hex to ascii, hash to base58, etc..)
  • I moved the logic about event from index.ts to events/index.ts. I keep the same logic: this file map smart contract event to individual event handler. Each event handler then emit to mesg (if they want to) and parse the event using the functions in first point.
  • I also moved the logic about task from index.ts to tasks/index.ts. No logic changed.

@mesg-foundation/core please review

Copy link
Member

@antho1404 antho1404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the simplification of the index :) it was really messy

Copy link
Contributor

@ilgooz ilgooz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

manual tests are ok

@ilgooz ilgooz merged commit 117f75f into dev Apr 4, 2019
@ilgooz ilgooz deleted the ss/marketplace-event branch April 4, 2019 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants